﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Reporting.WinForms;

namespace CentroVentas.Forms.Compras
{
    /// <summary>
    /// Interaction logic for FrmVerCompraReporte.xaml
    /// </summary>
    public partial class FrmVerCompraReporte : Page
    {
        public FrmVerCompraReporte()
        {
            InitializeComponent();

            try
            {
                rpv.Reset();
                rpv.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
                LocalReport lr = rpv.LocalReport;

                lr.ReportPath = "C:\\Users\\JoseMiguel\\Desktop\\CentroVentas\\Reports\\Compra.rdlc";

                ReportParameter rp = new ReportParameter("Orden", "3");

                lr.SetParameters(rp);
                
                rpv.RefreshReport();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
